package day2018_lab02.test13;

public class School extends ComperAverage{
    //School中计算平均分的方法是直接是总分除以总科目。
       double s1;
       double s2;
       double s3;

    public void setS1(int s1) {
        this.s1 = s1;
    }

    public double getS1() {
        return s1;
    }

    public void setS2(int s2) {
        this.s2 = s2;
    }

    public double getS2() {
        return s2;
    }

    public void setS3(int s3) {
        this.s3 = s3;
    }

    public double getS3() {
        return s3;
    }

    @Override
    double average() {
        return (s1+s2+s3)/3;
    }
}
